package com.dannypatterson.videochat.controls {
	
	import flash.media.Video;
	
	import mx.core.Container;
	
	/**
	 * Flex component that wraps the Video display object.
	 * 
	 * @author Danny Patterson
	 */
	public class FlexVideo extends Container {
		
		public var video:Video;
		
		public function FlexVideo() {
			super();
		}
		
		override protected function createChildren():void {
			super.createChildren();
			video = new Video();
			rawChildren.addChild(video);
		}
		
		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
			super.updateDisplayList(unscaledWidth, unscaledHeight);
			video.width = unscaledWidth;
			video.height = unscaledHeight;
		}
		
	}
	
}